import java.util.Scanner;
public class a1 {
    public static void main(String[] args) {
        Scanner reader=new Scanner(System.in);
        System.out.println("请输入小王的性别: ");
        String xwGender= reader.next();
        System.out.println("请输入小张的性别: ");
        String xzGender= reader.next();
        if (xwGender.equals("男") &&xzGender.equals("男")||xwGender.equals("女") &&xzGender.equals("女")){
            System.out.println("不可以结婚");
        }else {
            System.out.println("可以结婚");
        }
    }
}